import store from '@store/index';

function setToken() {
  return (xhr) => {
    const token = store.state.user.token;
    xhr.setRequestHeader('Set-Cookie', token);
  };
}

function getUrl() {
  return (res) => {
    const url = store.state.url;
    // .akeyId = res.data.otherKeyId;
    return url + res.data.path;
  };
}

export {
  setToken,
  getUrl
};
